#ifndef ACTIVITYEDITOR_H
#define ACTIVITYEDITOR_H

#include <QMainWindow>
#include <QListWidget>
#include "creditutility.h"
namespace Ui {
class ActivityEditor;
}

class ActivityEditor : public QMainWindow
{
    Q_OBJECT

public:
    explicit ActivityEditor(QWidget *parent = nullptr);
    ~ActivityEditor();

    QMainWindow* home;
    QMap<QString,Student> students;
    Activity activity;

    QString curRecName={};
    ActivityType recCheckState = allType;
    void updateRecCheckState();
    void refreshStu();
    void refreshAct();
    QStringList ActivityTypeNames(ActivityType type);
private slots:
    void on_queryStuEdit_textChanged(const QString &arg1);

    void on_loadBtn_clicked();

    void on_saveBtn_clicked();

    void on_homeBtn_clicked();

    void on_actNameEdit_editingFinished();

    void on_actTypeStuWork_clicked(bool checked);

    void on_actTypePerDev_clicked(bool checked);

    void on_actTypeVolAct_clicked(bool checked);

    void on_actTypePracVis_clicked(bool checked);

    void on_actTypeComLife_clicked(bool checked);

    void on_actTypeAll_clicked(bool checked);

    void on_recNewBtn_clicked();

    void on_recRemBtn_clicked();

    void on_recListWid_itemDoubleClicked(QListWidgetItem *item);

    void on_recNameEdit_editingFinished();

    void on_recTypeStuWork_clicked(bool checked);

    void on_recTypePerDev_clicked(bool checked);

    void on_recTypeVolAct_clicked(bool checked);

    void on_recTypePracVis_clicked(bool checked);

    void on_recTypeComLife_clicked(bool checked);

    void on_recTypeAll_clicked(bool checked);

    void on_recTableWid_cellClicked(int row, int column);

    void on_paBatchAddBtn_clicked();

    void on_paRemBtn_clicked();

    void on_paUpdBtn_clicked();

    void on_returnBtn_clicked();

private:
    Ui::ActivityEditor *ui;
};

#endif // ACTIVITYEDITOR_H
